<script type="text/javascript">
function add_chk(o)
{
	if(!o.username.value)
	{
		alert("{:lan('cn'=>'姓名不不能为空','en'=>'Name can not be empty')}")
		return false;
	}
	if(!o.email.value)
	{
		alert("{:lan('cn'=>'邮箱不不能为空','en'=>'Email can not be empty')}")
		return false;
	}
}
</script>

<div class="book">
  <form method="post" action="form.php?act=addok" onsubmit="return add_chk(this);">
    <div class="book_input">
      <div>{:lan("cn"=>"姓名","en"=>"Name")} <span style="color:red;">*</span></div>
      <p><input class="ginput" type="text" name="username" id="username" /></p>
    </div>
    
    <div class="book_input">
      <div>{:lan("cn"=>"邮箱","en"=>"E-mail")} <span style="color:red;">*</span></div>
      <p><input class="ginput" type="text" name="email" id="email" /></p>
    </div>
    
    <div class="book_input">
      <div>{:lan("cn"=>"电话","en"=>"Tel")}</div>
      <p><input class="ginput" type="text" name="tel" id="tel" /></p>
    </div>
    
    <!-- run:$formlist = QGMOD_FORMLIST("book") -->
    <!-- $formlist AS $key=>$value -->
    <div class="book_input">
      <div>{:$value[field_name]}</div>
      <p><input class="ginput" type="text" name="{:$value[sign]}" id="{:$value[sign]}" /></p>
    </div>
    <!-- end -->
    <!-- run:unset($formlist) -->
    
    <div class="book_input book_textarea">
      <div>{:lan("cn"=>"留言","en"=>"Message")}</div>
      <p><textarea class="gtext" name="content" id="content"></textarea></p>
    </div>
    
    <button class="gbutton" type="submit">{:lan('cn'=>'提交','en'=>'Submit')}</button>
  </form>
</div>